import request from '@/utils/request'

// 查询报损单列表
export function listErpWareReporting(query) {
  return request({
    url: '/erp/ErpWareReporting/list',
    method: 'get',
    params: query
  })
}

// 查询报损单详细
export function getErpWareReporting(wareReportingId) {
  return request({
    url: '/erp/ErpWareReporting/' + wareReportingId,
    method: 'get'
  })
}

// 新增报损单
export function addErpWareReporting(data) {
  return request({
    url: '/erp/ErpWareReporting',
    method: 'post',
    data: data
  })
}

// 修改报损单
export function updateErpWareReporting(data) {
  return request({
    url: '/erp/ErpWareReporting',
    method: 'put',
    data: data
  })
}

// 审核报损单
export function auditErpWareReporting(data) {
  return request({
    url: '/erp/ErpWareReporting/audit',
    method: 'put',
    data: data
  })
}

// 删除报损单
export function delErpWareReporting(wareReportingId) {
  return request({
    url: '/erp/ErpWareReporting/' + wareReportingId,
    method: 'delete'
  })
}
